<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title>我的团队</title>
<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
<link rel="stylesheet" type="text/css" href="../../css/common.css" />
<style>
#top{
	position: relative;
	/*height: 7rem;*/
	background: #E63350 !important;
	padding-bottom: 1rem;
}
#header{
	background: transparent;
}
.peoBox{
	color: #fff;
	text-align: center;
	font-weight: bold;
}
.peoBox .peo{
	font-size:2.4rem;

}
</style>
</head>

<body>
<div id="top">
	<header class="aui-bar aui-bar-nav" id="header">
				<div class="aui-pull-left back" tapmode onclick="api.closeWin()"></div>
				<!-- <div class="aui-title">订单详情</div> -->
		</header>
		<div class="aui-text-center color-fff">我的成员共完成订单</div>
		<p class="peoBox aui-font-size-14"><span class="peo">0</span>单</p>

</div>
</body>
<script type="text/javascript" src="../../script/import.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
    apiready = function() {
        api.parseTapmode();
		var top = $api.byId('top');
        $api.fixStatusBar(top);
        var topH = $api.offset(top).h;
        api.openFrame({
            name: 'my_team_frm2',
            url: 'my_team_frm2.html',
            rect: {
                x: 0,
                y: topH,
                w: 'auto',
                h: 'auto'
            },
						bounces: false,
            pageParam: api.pageParam
        });
				if(api.pageParam.teamPeo){
					// $$('.peo').text(api.pageParam.teamPeo)
				}

				getcountorder()
    };

	function getcountorder(){
		api.ajax({
		    url: BASE_URL + 'App/User/teamListorder',
		    method: 'post',
		    data: {
		        values: {
		            userid: getUserId(),
								team:2
		        },
		    }
		},function(ret, err){
		    if (ret.code == 1) {
		        $$('.peo').text(ret.ordercount)
		    } else {
					console.log(JSON.stringify(ret));

		        alert( JSON.stringify( err ) );
		    }
		});

	}



</script>
</html>
